#include<stdio.h>

 
int main()

 
{

 
    int i,h,w,n,s;

 
    scanf("%d",&n);

 
    for(i=0;i<n;i++)

 
    {

 
        scanf("%d %d",&h,&w);

 
        s=(h-100)*0.9*2*1000;

 
        w=w*1000;

 
        if(w>s*9/10&&w<s*11/10)

 
        printf("You are wan mei!\n");

 
        if(w<=s*9/10)

 
        printf("You are tai shou le!\n");

 
        if(w>=s*11/10)

 
        printf("You are tai pang le!\n"); 

 
   }

 
   return 0;

 
}
